Repository navigation
Add QuadraticFormNetwork - #195
jack-dunham wants to merge 3 commits into
Conversation
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## jd/itensor-network-operator #195 +/- ##
===============================================================
+ Coverage 91.77% 92.08% +0.31%
===============================================================
Files 18 19 +1
Lines 802 847 +45
===============================================================
+ Hits 736 780 +44
- Misses 66 67 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3457ed5 to
2903a18
Compare
794d49b to
ee408ab
Compare
| return names(tn[src(edge)]) ∩ names(tn[dst(edge)]) | ||
| return names(tn, src(edge)) ∩ names(tn, dst(edge)) | ||
| end | ||
| function linknames(tn::AbstractGraph) |
There was a problem hiding this comment.
I've gone back and forth about this kind of definition... I feel like linknames(tn) is a bit underdefined, and maybe should output a Dictionary from edges to link names. Then maybe we could define flatten_linknames as a flattened version. Also, when it is being used, does it need to be instantiated, or is lazy fine? If so I'd even lean towards only defining linknames(tn) to output a Dictionary and then callsites can call Iterators.flatten(linknames(tn)).
There was a problem hiding this comment.
I think most of the time we just want to iterate over linknames, which even as a dictionary, wouldn't need flatten explicitly.
45b5eaf to
3ea76fd
Compare
ITensorNetworkOperator and QuadraticFormNetwork data structuresQuadraticFormNetwork
The graph structure, `braname`, `kettensor`, `bratensor`, `branetwork` and the name-map checks move from `NormNetwork` to the abstract type, defined from `ketnetwork` and `branamemap`. `BraView` wraps any subtype. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure move: `normnetworkview.jl` becomes `abstractbilinearformnetwork.jl` and `normnetwork.jl` moves alongside it, with only the `include` paths updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The triple-layer network `⟨tn|op|tn⟩` of a ket layer and an `ITensorNetworkOperator`, built on the bilinear-form interface with `operatornetwork` and `operatortensor`, and contracted by belief propagation through its `factor_tensors` method. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3ea76fd to
0f01577
Compare
Adds
QuadraticFormNetwork, a lazy representation of⟨ψ|O|ψ⟩whereOis anITensorNetworkOperator. Each later can be obtained viaketnetwork,operatornetworkandbranetwork. Belief propagation runs on it directly.The constructor checks that the operator's inputs are site indices of
ψon the right vertices, and that no index names clash between layers.NormNetworkandQuadraticFormNetworknow share anAbstractBilinearFormNetworksupertype, and both live insrc/bilinearforms/.